using MicroMsg.Storage;
using System;
namespace MicroMsg.Manager
{
	public class BContactMgr
	{
		public static string getDisplayName(string username)
		{
			if (string.IsNullOrEmpty(username))
			{
				return username;
			}
			if (!ContactHelper.isBottleContact(username))
			{
				return username;
			}
			username = BContactMgr.toBottleContactUserName(username);
			BottleContact bottleContact = StorageMgr.bContact.method_0(username);
			if (bottleContact == null)
			{
				return null;
			}
			return bottleContact.strCity;
		}
		public static string toBottleContactUserName(string userName)
		{
			if (!ContactHelper.isBottleContact(userName))
			{
				return userName;
			}
			string[] array = userName.Split(new char[]
			{
				':'
			});
			if (array != null && array.Length >= 1)
			{
				return array[0];
			}
			return userName;
		}
	}
}
